<template>
  <div id="main"></div>
</template>

<script>
import * as echarts from "echarts";

export default {
  async mounted() {
    var chartDom = document.getElementById("main");
    var myChart = echarts.init(chartDom);
    var { data } = await this.$req.get("/reports/type/1");
    // console.log(data);
    var option = data.data;
    option && myChart.setOption(option);
  },
};
</script>

<style> 
#main{
  width: 600px;
  height: 400px;
}
</style>